package easy;


public class test37 {
    public static void main(String[] args) {
        System.out.println(threeConsecutiveOdds(new int[]{2, 6, 1, 1, 1, 4, 1}));
    }

    public static boolean threeConsecutiveOdds(int[] arr) {
        int a = 0;
        for (int j : arr) {
            if (j % 2 == 1) {
                a++;
            } else {
                a = 0;
            }
            if (a == 3) {
                return true;
            }
        }
        return false;
    }
}
